package com.coderman.common.model.student;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;

/**
 * 考试信息实体类
 * @author 文晓平
 * @version 1.0
 * @Date 2023-1-9
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("")
@Table(name = "`c_studentscore`")
public class StudentScore {
    @Id
    @Column(name = "`scoreId`")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty("")
    private Integer scoreId;

    @Column(name = "`studentId`")
    @ApiModelProperty("")
    private Integer studentId;

    @Column(name = "`examTypeId`")
    @ApiModelProperty("")
    private Integer examTypeId;

    @Column(name = "`examTime`")
    @ApiModelProperty("")
    private String examTime;

    @Column(name = "`examScore`")
    @ApiModelProperty("")
    private Double examScore;

    @Column(name = "`remarks`")
    @ApiModelProperty("")
    private String remarks;
    @TableField(exist = false)
    private transient String studentName;
    @TableField(exist = false)
    private transient String examTypeName;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private transient String startTime;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private transient String endTime;
}